axios.interceptors.request.use(
  function (config) {
    // 在发送请求之前做些什么
    if (config.url === 'user/getUserInfo') {
      config.url = 'http://124.223.14.236:8060/' + config.url
    } else {
      config.url = 'http://124.223.14.236:8060/home/' + config.url
    }
    // config.url = 'http://124.223.14.236:8060/home/' + config.url
    let str = config.url
    // if (str.indexOf('/my/') != -1) {
    // config.Header = { Authorization: localStorage.getItem('togen') || '' }
    //   config.headers.Authorization = localStorage.getItem('togen') || ''
    // }
    return config
  },
  function (error) {
    // 对请求错误做些什么
    console.log(error)
    return Promise.reject(error)
  },
)
